//底部选项卡切换
(function(){
    var $item = $("#navTab").find(".js-tab-item"); //获取底部导航元素集合

    $item.each(function(){
        var $this = $(this);
        var oldUrl = $this.attr("href").split("/"); //定义当前url地址
        oldUrl.pop();
        var newUrl = oldUrl.join("/");

        // console.log(newUrl + ',' + location.href);

        // console.log(linkUrl);
        if(location.href.indexOf(newUrl) !== -1){
            $this.addClass("weui_bar_item_on").siblings().removeClass("weui_bar_item_on");
        }
    });
}());